# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvm-tools
pkgver=22.6.1
pkgrel=0
pkgdesc="Collection of tools for remote controlling a OpenVAS / Greenbone"
url="https://github.com/greenbone/gvm-tools"
arch="noarch"
license="GPL"
depends="python3 py3-dialog py3-defusedxml py3-paramiko py3-lxml"
makedepends="py3-build py3-installer py3-poetry-core py3-wheel"
checkdepends="py3-gvm py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvm-tools/archive/v$pkgver.tar.gz"

build() {
	# XXX: hack for poetry to not ignore files
	GIT_DIR=. python3 -m build --no-isolation --wheel
}

check() {
	# outdated snapshot compare
	python3 -m pytest --ignore tests/test_parser.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/gvm_tools-$pkgver-py3-none-any.whl
}

sha512sums="
9b4260241099783f9c49d6397832e01e4884dea8f957886c0cf487badaca301bcd76dd6a5ba71da4d2d1350898af0901ecc674164bf36600949934906272960b  gvm-tools-22.6.1.tar.gz
"
